/*
 * @Description:
 * @Author: HYH
 * @LastEditors: HYH
 * @LastEditTime: 2023-06-29 17:21:03
 */
import request from '@/utils/request'
import axios from 'axios'


/**复制模板功能 */
export function skuTempCopy(data) {
  return request({
    url: '/distribution/sku/skuTempCopy',
    method: 'post',
    data
  })
}

/**修改模板 */
export function editTemplate(data) {
  return request({
    url: '/distribution/skuDistributor/insertDistributorSkuTemplate',
    method: 'post',
    data
  })
}


/**新增模板 */
export function addTemplate(data) {
  return request({
    url: '/distribution/skuDistributor/insertDistributorSkuTemplate',
    method: 'post',
    data
  })
}

/**删除模板 */
export function deleteTemplate(id) {
  return request({
    url: `/distribution/skuDistributor/deleteDistributorSkuTemplate?id=${id}`,
    method: 'delete',
  })
}


/**获取卖家SKU模板列表 */
export function getTemplateList(skuId) {
  return request({
    url: `/distribution/skuDistributor/getSellerSkuTemplate?skuId=${skuId}`,
  })
}



/** */
export function uploadImg(formData) {
  return request(
    {
      url: `/system/oss/upload`,
      method: 'post',
      data: formData,
      headers: { 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundary7TMYhSONfkAM2z3a','timeout':20000 },
      repetitiveConfig:{
        neglectful:true,
        interval:3000
      },
    }
  )

}

